#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class CateCode : Business.BusinessBase<CateCode, int>
	{
		#region Fields and Properties

		private String parentCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String ParentCode
		{
			get { return parentCode; }
			set
			{
				if (value != parentCode)
				{
					MarkChanged("ParentCode");
					parentCode = value;
				}
			}
		}

		private String cateDes = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String CateDes
		{
			get { return cateDes; }
			set
			{
				if (value != cateDes)
				{
					MarkChanged("CateDes");
					cateDes = value;
				}
			}
		}

		private String cateName = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String CateName
		{
			get { return cateName; }
			set
			{
				if (value != cateName)
				{
					MarkChanged("CateName");
					cateName = value;
				}
			}
		}

		private String code = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Code
		{
			get { return code; }
			set
			{
				if (value != code)
				{
					MarkChanged("Code");
					code = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public CateCode()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override CateCode DataSelect(int id)
		{
			return Services.DALService.CateCodeService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.CateCodeService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.CateCodeService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.CateCodeService.Delete(this);
		}

		#endregion Base overrides
	}
}
